﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_frmTaoChuongHoc : System.Web.UI.Page
{
    DataClassesDataContext db = new DataClassesDataContext();
    clsChuongHoc frmchuong = new clsChuongHoc();
    protected void Page_Load(object sender, EventArgs e)
    {
        btnThemChuong.Attributes.Add("onclick", "return KtraChuong();");
    }
    
    
    protected void btnThemChuong_Click(object sender, EventArgs e)
    {
        string tenchuong = txtChuonghoc.Text;
        string mamon = drlTenMonHoc.SelectedValue;
        frmchuong.ThemChuong(tenchuong, mamon);
        GridView1.DataBind();
    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "MyDelete")
        {
            string mach = Convert.ToString(e.CommandArgument); ;

            //Lenh xoa o day

            db.SubmitChanges();
            //LoadDanhSach(); //Load lai thong tin
        }
    }
}
